#import "GKCover.h"
#import "AppDelegate.h"
#import "dfhgwhruebvhrheyavenuetyre.h"
#import "dfhgwhruebvhrheyoutwarddelegate.h"
#import "dfhgwhruebvhrheyluggagerecorder.h"
#import "dfhgwhruebvhrheyleatherfreight.h"
#import "dfhgwhruebvhrheycapableintellectual.h"
#import "dfhgwhruebvhrheysecurityinjure.h"
#import "dfhgwhruebvhrheyprevalentconnectionViewController.h"
#import "dfhgwhruebvhrheydisastrousvibrate.h"
#import "dfhgwhruebvhrheyauthoritycatalogue.h"
#import "dfhgwhruebvhrheyversionvictimViewController.h"
#import "dfhgwhruebvhrheydispositionvisualizeViewController.h"
#import "dfhgwhruebvhrheyvisualizeterritoryViewController.h"
@interface dfhgwhruebvhrheyprevalentconnectionViewController ()
@property (nonatomic, strong) dfhgwhruebvhrheycapableintellectual *popView;
@property (nonatomic, strong) dfhgwhruebvhrheydisastrousvibrate *calendarView;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *residentViewTopConstraint;
@property (weak, nonatomic) IBOutlet dfhgwhruebvhrheysecurityinjure *industryView;
@property (weak, nonatomic) IBOutlet dfhgwhruebvhrheysecurityinjure *companyNameView;
@property (weak, nonatomic) IBOutlet dfhgwhruebvhrheysecurityinjure *workExpView;
@property (weak, nonatomic) IBOutlet dfhgwhruebvhrheysecurityinjure *payDayView;
@property (weak, nonatomic) IBOutlet dfhgwhruebvhrheysecurityinjure *inComeView;
@property (weak, nonatomic) IBOutlet dfhgwhruebvhrheysecurityinjure *companyAddressView;
@property (weak, nonatomic) IBOutlet dfhgwhruebvhrheysecurityinjure *companyDetailAddress;
@property (weak, nonatomic) IBOutlet dfhgwhruebvhrheysecurityinjure *residentView;
@property (weak, nonatomic) IBOutlet dfhgwhruebvhrheysecurityinjure *addressDetailView;
@property (weak, nonatomic) IBOutlet dfhgwhruebvhrheysecurityinjure *ownerShipView;
@end
@implementation dfhgwhruebvhrheyprevalentconnectionViewController
- (dfhgwhruebvhrheycapableintellectual *)popView {
	if(!_popView) {
		_popView = [[NSBundle mainBundle] loadNibNamed:@"dfhgwhruebvhrheycapableintellectual" owner:nil options:nil].firstObject;
	}
	return _popView;
}
- (dfhgwhruebvhrheydisastrousvibrate *)calendarView {
	if (!_calendarView) {
		_calendarView = [[NSBundle mainBundle] loadNibNamed:@"dfhgwhruebvhrheydisastrousvibrate" owner:nil options:nil].firstObject;
	}
	return _calendarView;
}
- (void)viewDidLoad {
    [super viewDidLoad];
	[self loadUI];
	[self loadPopData];
	[self loadLocalData];
	[dfhgwhruebvhrheyoptionsaving uploadRiskDataByCatchId:@"6" andApplyId:nil withDetailId:nil];
	NSString *identifier = [[NSUserDefaults standardUserDefaults] stringForKey:[NSString stringWithFormat:@"%@_%@", [dfhgwhruebvhrheyoptionsaving getUserData].phone, PPP_Auth_Page_Progress]];
	if ([identifier isEqualToString:@"basic_info"]) {
		[[NSUserDefaults standardUserDefaults] setObject:@"auth_job" forKey:[NSString stringWithFormat:@"%@_%@", [dfhgwhruebvhrheyoptionsaving getUserData].phone, PPP_Auth_Page_Progress]];
	}
}
- (void)loadPopData {
	if (self.popDataModel == nil) {
		[dfhgwhruebvhrheyoptionsaving.keyWindow startLoading];
		__weak typeof(self) weakSelf = self;
		[[dfhgwhruebvhrheyluggagerecorder shareInstance] dhgfywegwygeydwbarrierawait:dhgfywegwygeydwlambbreast path:authPopDataApi isEncrypt:YES withParams:nil success:^(NSURLSessionDataTask * _Nonnull task, NSString * _Nonnull json) {
			[dfhgwhruebvhrheyoptionsaving.keyWindow stopLoading];
			__strong typeof(weakSelf) strongSelf = weakSelf;
			dfhgwhruebvhrheyleatherfreight *popModel = [dfhgwhruebvhrheyleatherfreight yy_modelWithJSON:json];
			strongSelf.popDataModel = popModel;
		} failure:^(NSURLSessionDataTask * _Nonnull task, NSError * _Nonnull error) {
			[dfhgwhruebvhrheyoptionsaving.keyWindow stopLoading];
		}];
	}
}
- (void)loadLocalData {
	if (!self.localModel) {
		NSString *authDataString = [dfhgwhruebvhrheyoptionsaving getDataStringByKey:PPP_Basic_Auth_Data];
		if (authDataString.length) {
			self.localModel = [dfhgwhruebvhrheyauthoritycatalogue yy_modelWithJSON:authDataString];
		}else {
			self.localModel = [[dfhgwhruebvhrheyauthoritycatalogue alloc] init];
		}
	}
	if (self.localModel.branch.length == 0) {
		[self extraWorkInfoViewShow:0];
	}else {
		NSString *jobType = [[NSUserDefaults standardUserDefaults] stringForKey:PPP_AuthJobType];
		[self extraWorkInfoViewShow:jobType];
	}
	[self.industryView bindContent:self.localModel.branch];
	[self.companyNameView bindContent:self.localModel.company_name];
	[self.workExpView bindContent:self.localModel.work_time_long];
	[self.inComeView bindContent:self.localModel.client_salary];
	[self.companyAddressView bindContent:self.localModel.wk_pro];
	[self.companyDetailAddress bindContent:self.localModel.wk_addr];
	[self.addressDetailView bindContent:self.localModel.lv_addr];
	[self.ownerShipView bindContent:self.localModel.hbl];
	if (self.localModel.pay_date_one.length != 0 && self.localModel.pay_date_two.length != 0) {
		[self.payDayView bindContent:[NSString stringWithFormat:@"%@, %@", self.localModel.pay_date_one, self.localModel.pay_date_two]];
	}
	if (self.localModel.lv_pro.length != 0 && self.localModel.lv_city.length != 0 && self.localModel.lv_stre.length != 0) {
		[self.residentView bindContent:[NSString stringWithFormat:@"%@ %@ %@", self.localModel.lv_pro, self.localModel.lv_city, self.localModel.lv_stre]];
	}
}
- (void)loadUI {
	[self configBackIcon:@"dhgfywegwygeydwcurvereciprocal"];
	[self configRightIcon:@"navigation_right"];
	self.navigationItem.title = @"Job Information";
	self.navigationStyle = dhgfywegwygeydwreciprocaltransport;
	AppDelegate *delegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
	delegate.inBasicAuth = YES;
	__weak typeof(self) weakSelf = self;
	self.industryView.tag = 200;
	[self.industryView inputTextViewClick:^(dfhgwhruebvhrheysecurityinjure * _Nonnull clickView) {
		__strong typeof(weakSelf) strongSelf = weakSelf;
		[strongSelf showPopViewTag:strongSelf.industryView.tag];
	}];
	self.workExpView.tag = 201;
	[self.workExpView inputTextViewClick:^(dfhgwhruebvhrheysecurityinjure * _Nonnull clickView) {
		__strong typeof(weakSelf) strongSelf = weakSelf;
		[strongSelf showPopViewTag:strongSelf.workExpView.tag];
	}];
	self.payDayView.tag = 202;
	[self.payDayView inputTextViewClick:^(dfhgwhruebvhrheysecurityinjure * _Nonnull clickView) {
		__strong typeof(weakSelf) strongSelf = weakSelf;
		[strongSelf showPopViewTag:strongSelf.payDayView.tag];
	}];
	self.inComeView.tag = 203;
	[self.inComeView inputTextViewClick:^(dfhgwhruebvhrheysecurityinjure * _Nonnull clickView) {
		__strong typeof(weakSelf) strongSelf = weakSelf;
		[strongSelf showPopViewTag:strongSelf.inComeView.tag];
	}];
	self.companyAddressView.tag = 204;
	[self.companyAddressView inputTextViewClick:^(dfhgwhruebvhrheysecurityinjure * _Nonnull clickView) {
		__strong typeof(weakSelf) strongSelf = weakSelf;
		[strongSelf showPopViewTag:strongSelf.companyAddressView.tag];
	}];
	self.residentView.tag = 205;
	[self.residentView inputTextViewClick:^(dfhgwhruebvhrheysecurityinjure * _Nonnull clickView) {
		__strong typeof(weakSelf) strongSelf = weakSelf;
		[strongSelf showPopViewTag:strongSelf.residentView.tag];
	}];
	self.ownerShipView.tag = 206;
	[self.ownerShipView inputTextViewClick:^(dfhgwhruebvhrheysecurityinjure * _Nonnull clickView) {
		__strong typeof(weakSelf) strongSelf = weakSelf;
		[strongSelf showPopViewTag:strongSelf.ownerShipView.tag];
	}];
	[self.companyNameView inputStart:^(UITextField * _Nonnull inputTextField) {
		[dfhgwhruebvhrheyavenuetyre addTracking:company_name_duration withValue:0 byType:1];
	}];
	[self.companyNameView inputFinish:^(UITextField * _Nonnull inputTextField) {
		[dfhgwhruebvhrheyavenuetyre duartion:company_name_duration isCover:YES byType:1];
		[dfhgwhruebvhrheyavenuetyre updateCount:company_name_updatecount byType:1];
	}];
	[self.companyNameView inputTextChanged:^(UITextField * _Nonnull inputTextField) {
		__strong typeof(weakSelf) strongSelf = weakSelf;
		strongSelf.companyNameView.error = NO;
		if ([strongSelf.companyNameView.subviews containsObject:inputTextField]) {
			[strongSelf.companyNameView bindContent:inputTextField.text];
			strongSelf.localModel.company_name = inputTextField.text;
		}
	}];
	[self.companyDetailAddress inputFinish:^(UITextField * _Nonnull inputTextField) {
		[dfhgwhruebvhrheyavenuetyre duartion:company_detail_address_duration isCover:YES byType:1];
		[dfhgwhruebvhrheyavenuetyre updateCount:company_detail_address_updatecount byType:1];
	}];
	[self.companyDetailAddress inputStart:^(UITextField * _Nonnull inputTextField) {
		[dfhgwhruebvhrheyavenuetyre addTracking:company_detail_address_duration withValue:0 byType:1];
	}];
	[self.companyDetailAddress inputTextChanged:^(UITextField * _Nonnull inputTextField) {
		__strong typeof(weakSelf) strongSelf = weakSelf;
		strongSelf.companyDetailAddress.error = NO;
		if ([strongSelf.companyDetailAddress.subviews containsObject:inputTextField]) {
			[strongSelf.companyDetailAddress bindContent:inputTextField.text];
			strongSelf.localModel.wk_addr = inputTextField.text;
		}
	}];
	[self.addressDetailView inputFinish:^(UITextField * _Nonnull inputTextField) {
		[dfhgwhruebvhrheyavenuetyre duartion:detail_address_duration isCover:YES byType:1];
		[dfhgwhruebvhrheyavenuetyre updateCount:detail_address_updatetime byType:1];
		if (self.residentView.areadFilled) {
			[dfhgwhruebvhrheyavenuetyre duationTotal:address_completed_duration withDuration1:residence_duration andDuration2:detail_address_duration];
		}
	}];
	[self.addressDetailView inputStart:^(UITextField * _Nonnull inputTextField) {
		[dfhgwhruebvhrheyavenuetyre addTracking:detail_address_duration withValue:0 byType:1];
	}];
	[self.addressDetailView inputTextChanged:^(UITextField * _Nonnull inputTextField) {
		__strong typeof(weakSelf) strongSelf = weakSelf;
		strongSelf.addressDetailView.error = NO;
		if ([strongSelf.addressDetailView.subviews containsObject:inputTextField]) {
			[strongSelf.addressDetailView bindContent:inputTextField.text];
			strongSelf.localModel.lv_addr = inputTextField.text;
		}
	}];
}
- (void)extraWorkInfoViewShow:(NSString *)type {
	[[NSUserDefaults standardUserDefaults] setValue:type forKey:PPP_AuthJobType];
	if ([type isEqualToString:@"1"]) {
		self.residentViewTopConstraint.constant = 12;
		self.companyNameView.superview.hidden = YES;
		self.workExpView.superview.hidden = YES;
		self.payDayView.superview.hidden = YES;
		self.inComeView.superview.hidden = YES;
		self.companyAddressView.superview.hidden = YES;
		self.companyDetailAddress.superview.hidden = YES;
		[dfhgwhruebvhrheyavenuetyre addTracking:Industry_category_add_type withValue:1 byType:1];
	}else {
		self.companyNameView.superview.hidden = NO;
		self.workExpView.superview.hidden = NO;
		self.payDayView.superview.hidden = NO;
		self.inComeView.superview.hidden = NO;
		self.companyAddressView.superview.hidden = NO;
		self.companyDetailAddress.superview.hidden = NO;
		self.residentViewTopConstraint.constant = 570;
		[dfhgwhruebvhrheyavenuetyre addTracking:Industry_category_add_type withValue:2 byType:1];
	}
}
- (void)showPopViewTag:(NSUInteger)tag {
	__weak typeof(self) weakSelf = self;
	[self.view endEditing:YES];
	switch (tag) {
		case 200: {
			NSLog(@"工作类型");
			self.popView.popTitle = @"Industry Category";
			[dfhgwhruebvhrheyavenuetyre addTracking:Industry_category_duration withValue:0 byType:1];
			[GKCover coverFrom:[dfhgwhruebvhrheyoptionsaving keyWindow] contentView:self.popView style:GKCoverStyleTranslucent showStyle:GKCoverShowStyleCenter showAnimStyle:GKCoverShowAnimStyleCenter hideAnimStyle:GKCoverHideAnimStyleCenter notClick:YES];
			[self.popView bindPopData:self.popDataModel.branch andSelect:^(dhgfywegwygeydwpursuitlaser * _Nonnull select) {
				__strong typeof(weakSelf) strongSelf = weakSelf;
				[GKCover hideCover];
				if (select != nil) {
					[strongSelf.industryView bindContent:select.title];
					strongSelf.localModel.branch = select.title;
					[strongSelf extraWorkInfoViewShow:select.type];
					[dfhgwhruebvhrheyavenuetyre duartion:Industry_category_duration isCover:YES byType:1];
					[dfhgwhruebvhrheyavenuetyre updateCount:Industry_category_updatecount byType:1];
				}
			}];
		}
			break;
		case 201: {
			NSLog(@"工作经验");
			self.popView.popTitle = @"Working Experience";
			[dfhgwhruebvhrheyavenuetyre addTracking:working_Experienct_duration withValue:0 byType:1];
			[GKCover coverFrom:[dfhgwhruebvhrheyoptionsaving keyWindow] contentView:self.popView style:GKCoverStyleTranslucent showStyle:GKCoverShowStyleCenter showAnimStyle:GKCoverShowAnimStyleCenter hideAnimStyle:GKCoverHideAnimStyleCenter notClick:YES];
			[self.popView bindPopData:self.popDataModel.user_work andSelect:^(dhgfywegwygeydwpursuitlaser * _Nonnull select) {
				__strong typeof(weakSelf) strongSelf = weakSelf;
				[GKCover hideCover];
				if (select != nil) {
					[strongSelf.workExpView bindContent:select.title];
					strongSelf.localModel.work_time_long = select.title;
					if (strongSelf.localModel.pay_date_one.length == 0 && strongSelf.localModel.pay_date_two.length == 0) {
						[strongSelf showPopViewTag:strongSelf.payDayView.tag];
					}
					[dfhgwhruebvhrheyavenuetyre duartion:working_Experienct_duration isCover:YES byType:1];
					[dfhgwhruebvhrheyavenuetyre updateCount:working_Experienct_updatecount byType:1];
				}
			}];
		}
			break;
		case 202: {
			NSLog(@"发薪日");
			[dfhgwhruebvhrheyavenuetyre addTracking:payday_first_duration withValue:0 byType:1];
			[dfhgwhruebvhrheyavenuetyre addTracking:payday_second_duration withValue:0 byType:1];
			[GKCover coverFrom:[dfhgwhruebvhrheyoptionsaving keyWindow] contentView:self.calendarView style:GKCoverStyleTranslucent showStyle:GKCoverShowStyleCenter showAnimStyle:GKCoverShowAnimStyleCenter hideAnimStyle:GKCoverHideAnimStyleCenter notClick:YES];
			[self.calendarView selectPayDay:^(NSString * _Nonnull pay1, NSString * _Nonnull pay2) {
				__strong typeof(weakSelf) strongSelf = weakSelf;
				strongSelf.calendarView = nil;
				[GKCover hideCover];
				if (pay1.length && pay2.length) {
					strongSelf.localModel.pay_date_one = pay1;
					strongSelf.localModel.pay_date_two = pay2;
					[strongSelf.payDayView bindContent:[NSString stringWithFormat:@"%@, %@", pay1, pay2]];
					[strongSelf showPopViewTag:strongSelf.inComeView.tag];
					[dfhgwhruebvhrheyavenuetyre duartion:payday_first_duration isCover:YES byType:1];
					[dfhgwhruebvhrheyavenuetyre duartion:payday_second_duration isCover:YES byType:1];
					[dfhgwhruebvhrheyavenuetyre updateCount:payday_first_updatecount byType:1];
					[dfhgwhruebvhrheyavenuetyre updateCount:payday_second_updatecount byType:1];
				}
			}];
		}
			break;
		case 203: {
			NSLog(@"收入");
			self.popView.popTitle = @"Monthly Income";
			[dfhgwhruebvhrheyavenuetyre addTracking:month_income_duration withValue:0 byType:1];
			[GKCover coverFrom:[dfhgwhruebvhrheyoptionsaving keyWindow] contentView:self.popView style:GKCoverStyleTranslucent showStyle:GKCoverShowStyleCenter showAnimStyle:GKCoverShowAnimStyleCenter hideAnimStyle:GKCoverHideAnimStyleCenter notClick:YES];
			[self.popView bindPopData:self.popDataModel.my_salary andSelect:^(dhgfywegwygeydwpursuitlaser * _Nonnull select) {
				__strong typeof(weakSelf) strongSelf = weakSelf;
				[GKCover hideCover];
				if (select != nil) {
					[strongSelf.inComeView bindContent:select.title];
					strongSelf.localModel.client_salary = select.title;
					[dfhgwhruebvhrheyavenuetyre duartion:month_income_duration isCover:YES byType:1];
					[dfhgwhruebvhrheyavenuetyre updateCount:month_income_updatecount byType:1];
				}
			}];
		}
			break;
		case 204: {
			NSLog(@"公司地址");
			dfhgwhruebvhrheydispositionvisualizeViewController *address = (dfhgwhruebvhrheydispositionvisualizeViewController *)[UIStoryboard storyboard:@"Home" withidentifier:@"address"];
			address.level = 1;
			address.origin = self;
			[self.navigationController pushViewController:address animated:YES];
			[dfhgwhruebvhrheyavenuetyre addTracking:company_address_duration withValue:0 byType:1];
			address.callback = ^(BOOL confirm) {
				if (confirm) {
					__strong typeof(weakSelf) strongSelf = weakSelf;
					NSString *pro = [[NSUserDefaults standardUserDefaults] stringForKey:PPP_Auth_Address_Provice];
					NSString *city = [[NSUserDefaults standardUserDefaults] stringForKey:PPP_Auth_Address_City];
					NSString *area = [[NSUserDefaults standardUserDefaults] stringForKey:PPP_Auth_Address_Area];
					NSString *wk_pro = [NSString stringWithFormat:@"%@ %@ %@", pro, city, area];
					strongSelf.localModel.wk_pro = wk_pro;
					[strongSelf.companyAddressView bindContent:wk_pro];
					[dfhgwhruebvhrheyavenuetyre duartion:company_address_duration isCover:YES byType:1];
					[dfhgwhruebvhrheyavenuetyre updateCount:company_address_updatecount byType:1];
				}
			};
		}
			break;
		case 205: {
			NSLog(@"Residence");
			dfhgwhruebvhrheydispositionvisualizeViewController *address = (dfhgwhruebvhrheydispositionvisualizeViewController *)[UIStoryboard storyboard:@"Home" withidentifier:@"address"];
			address.level = 1;
			address.origin = self;
			[self.navigationController pushViewController:address animated:YES];
			[dfhgwhruebvhrheyavenuetyre addTracking:residence_duration withValue:0 byType:1];
			address.callback = ^(BOOL confirm) {
				if (confirm) {
					__strong typeof(weakSelf) strongSelf = weakSelf;
					NSString *pro = [[NSUserDefaults standardUserDefaults] stringForKey:PPP_Auth_Address_Provice];
					NSString *city = [[NSUserDefaults standardUserDefaults] stringForKey:PPP_Auth_Address_City];
					NSString *area = [[NSUserDefaults standardUserDefaults] stringForKey:PPP_Auth_Address_Area];
					NSString *wk_pro = [NSString stringWithFormat:@"%@ %@ %@", pro, city, area];
					strongSelf.localModel.lv_pro = pro;
					strongSelf.localModel.lv_city = city;
					strongSelf.localModel.lv_stre = area;
					[strongSelf.residentView bindContent:wk_pro];
					[dfhgwhruebvhrheyavenuetyre duartion:residence_duration isCover:YES byType:1];
					[dfhgwhruebvhrheyavenuetyre updateCount:residence_updatecount byType:1];
					if (self.addressDetailView.areadFilled) {
						[dfhgwhruebvhrheyavenuetyre duationTotal:address_completed_duration withDuration1:residence_duration andDuration2:detail_address_duration];
					}
				}
			};
		}
			break;
		case 206: {
			NSLog(@"ownerShip");
			self.popView.popTitle = @"Residential Ownership";
			[GKCover coverFrom:[dfhgwhruebvhrheyoptionsaving keyWindow] contentView:self.popView style:GKCoverStyleTranslucent showStyle:GKCoverShowStyleCenter showAnimStyle:GKCoverShowAnimStyleCenter hideAnimStyle:GKCoverHideAnimStyleCenter notClick:YES];
			[self.popView bindPopData:self.popDataModel.lvl_time andSelect:^(dhgfywegwygeydwpursuitlaser * _Nonnull select) {
				__strong typeof(weakSelf) strongSelf = weakSelf;
				[GKCover hideCover];
				if (select != nil) {
					[strongSelf.ownerShipView bindContent:select.title];
					strongSelf.localModel.hbl = select.title;
				}
			}];
		}
			break;
		default:
			break;
	}
}
- (IBAction)tapGettureAction:(UITapGestureRecognizer *)sender {
	dfhgwhruebvhrheyversionvictimViewController *option = [[dfhgwhruebvhrheyversionvictimViewController alloc] init];
	[self.navigationController pushViewController:option animated:YES];
}
- (void)backAction {
	NSString *dataString = [self.localModel yy_modelToJSONString];
	[dfhgwhruebvhrheyoptionsaving saveDataString:dataString withKey:PPP_Basic_Auth_Data];
	[self.navigationController popViewControllerAnimated:YES];
	AppDelegate *delegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
	delegate.inBasicAuth = NO;
}
- (IBAction)continueAction {
    [self.view endEditing:YES];
	if (!self.localModel.branch.length) {
		self.industryView.error = YES;
		return [dfhgwhruebvhrheyoptionsaving.keyWindow show:@"Please select industry Category"];
	}
	NSString *jobType = [[NSUserDefaults standardUserDefaults] stringForKey:PPP_AuthJobType];
	if ([jobType isEqualToString:@"0"]) {
		if (!self.localModel.company_name.length) {
			self.companyNameView.error = YES;
			return [dfhgwhruebvhrheyoptionsaving.keyWindow show:@"Please fill in company name"];
		}
        self.localModel.company_name = [self.localModel.company_name stringByReplacingOccurrencesOfString:@" " withString:@""];
		if (!self.localModel.company_name.length) {
			self.companyNameView.error = YES;
			return [dfhgwhruebvhrheyoptionsaving.keyWindow show:@"Please fill in company name"];
		}
		if([self.localModel.company_name dhgfywegwygeydwmusiciansegment]) {
			self.companyNameView.error = YES;
			return [dfhgwhruebvhrheyoptionsaving.keyWindow show:@"Please enter correct company name"];
		}
		if (!self.localModel.work_time_long.length) {
			self.workExpView.error = YES;
			return [dfhgwhruebvhrheyoptionsaving.keyWindow show:@"Please select experience of work years"];
		}
		if (self.localModel.pay_date_one.length == 0 && self.localModel.pay_date_two.length == 0) {
			self.payDayView.error = YES;
			return [dfhgwhruebvhrheyoptionsaving.keyWindow show:@"Please select two pay dates"];
		}
		if (!self.localModel.client_salary.length) {
			self.inComeView.error = YES;
			return [dfhgwhruebvhrheyoptionsaving.keyWindow show:@"Please select monthly income"];
		}
		if (!self.localModel.wk_pro.length) {
			self.companyAddressView.error = YES;
			return [dfhgwhruebvhrheyoptionsaving.keyWindow show:@"Please select a work area"];
		}
        self.localModel.wk_addr = [self.localModel.wk_addr stringByReplacingOccurrencesOfString:@" " withString:@""];
		if (!self.localModel.wk_addr.length) {
			self.companyDetailAddress.error = YES;
			return [dfhgwhruebvhrheyoptionsaving.keyWindow show:@"Please fill in the work detail address"];
		}
		if([self.localModel.wk_addr dhgfywegwygeydwmusiciansegment]) {
			self.companyDetailAddress.error = YES;
			return [dfhgwhruebvhrheyoptionsaving.keyWindow show:@"Please enter correct the work detail address"];
		}
	}
	if (self.localModel.lv_pro.length == 0 || self.localModel.lv_city.length == 0 || self.localModel.lv_stre == 0) {
		self.residentView.error = YES;
		return [dfhgwhruebvhrheyoptionsaving.keyWindow show:@"Please select your living region"];
	}
    self.localModel.lv_addr = [self.localModel.lv_addr stringByReplacingOccurrencesOfString:@" " withString:@""];
	if (!self.localModel.lv_addr.length) {
		self.addressDetailView.error = YES;
		return [dfhgwhruebvhrheyoptionsaving.keyWindow show:@"Please fill in the detailed address"];
	}
	if([self.localModel.lv_addr dhgfywegwygeydwmusiciansegment]) {
		self.addressDetailView.error = YES;
		return [dfhgwhruebvhrheyoptionsaving.keyWindow show:@"Please enter correct detail address"];
	}
	if (!self.localModel.hbl.length) {
		self.ownerShipView.error = YES;
		return [dfhgwhruebvhrheyoptionsaving.keyWindow show:@"Please select residential ownership"];
	}
	NSString *dataString = [self.localModel yy_modelToJSONString];
	[dfhgwhruebvhrheyoptionsaving saveDataString:dataString withKey:PPP_Basic_Auth_Data];
	[[NSUserDefaults standardUserDefaults] setInteger:2 forKey:[NSString stringWithFormat:@"%@_%@", [dfhgwhruebvhrheyoptionsaving getUserData].phone, PPP_Auth_Progress]];
	dfhgwhruebvhrheyvisualizeterritoryViewController *list = (dfhgwhruebvhrheyvisualizeterritoryViewController *)[UIStoryboard storyboard:@"Home" withidentifier:@"contact"];
	list.localModel = self.localModel;
	list.popDataModel = self.popDataModel;
	[self.navigationController pushViewController:list animated:YES];
}
@end
